<%@ include file="connect.jsp" %>

<%
    String pert = request.getParameter("question");
    String answer = request.getParameter("answer");
    String id = request.getParameter("gamesID");
    String ganti = pert.replaceAll("'", "''");

    stat.executeUpdate("INSERT INTO DetailGames (Answer, gamesID, Question,stylesID)" +
            "values ('" + answer + "', '" + id + "','" + ganti + "',2)");


    response.sendRedirect("games.jsp?respon=Successfully added question!");

    conn.close();

%>